import express from 'express';
const router = express.Router();

// 示例
router.post('/demo', async (req, res) => {
	// 校验参数
	try {
		await joiValidate(
			joi.object({
				email: joi.string().required().email().error(new Error('请输入正确的邮箱')),
			}),
			req.body,
			res
		);
	} catch (e) {
		return;
	}

	res.json(formatResJson({ msg: 'success~' }));
});

module.exports = router;
